<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>

<?php
$realname=$_POST['realname'];
$gender=intval($_POST['gender']);
$point=$_POST['point'];
if($realname==''){
	echo '姓名未填写';
}else if($gender==0){
	echo '性别未选！';
}else if($point==''){
	echo '得分未填写';
}else{
	$point=$_POST['point'];
	$conn=mysql_connect('127.0.0.1:3306','betty','123qwe');
	mysql_query("SET NAMES 'utf8'");
	mysql_select_db('betty',$conn);
	$sql="INSERT INTO `scord` (`realname`,`gender`,`point`) VALUES('$realname','$gender','$point')";
	$s=mysql_query($sql,$conn);
	if($s){
		echo '提交成功';
	}else{
		echo '提交失败';
	}	
}
?>
<a href="scord-add.html">返回</a>
</body>
</html>